package com.igeek.service;

import com.igeek.dao.CustomerDao1;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class CustomerService1 {
    @Value("tom")
    private String name="rucy";

    @Value("#{customerDao1}")
    private CustomerDao1 customerDao1;
//    private CustomerDao1 customerDao1;
//    @Value("#{customerDao1}")
//    public void setCustomerDao1(CustomerDao1 customerDao1) {
//        this.customerDao1 = customerDao1;
//    }

    //保存业务方法
    public void save(){
        System.out.println("CustomerService业务层被调用了。。。");
        System.out.println("name:"+name);
        customerDao1.save();
    }
}
